﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace SimpleVSMProject
{
	public partial class MainPage : UserControl
	{
		public MainPage()
		{
			// Required to initialize variables
			InitializeComponent();
            MyRectangle.MouseEnter += new MouseEventHandler(MyRectangle_MouseEnter);
            MyRectangle.MouseLeave += new MouseEventHandler(MyRectangle_MouseLeave);
		}

        void MyRectangle_MouseLeave(object sender, MouseEventArgs e)
        {
            VisualStateManager.GoToState(this, "ByeBye", true);
        }

        void MyRectangle_MouseEnter(object sender, MouseEventArgs e)
        {
            VisualStateManager.GoToState(this, "IAmInside", true);
        }
	}
}